﻿/*
   Open Intel 
   Copyright © 2011 – ISC. All Rights Reserved.
*/
using System;
using System.Windows;
using Caliburn.Micro;

namespace OI.Framework
{
    public class ToolboxItem : PropertyChangedBase
    {
        public string Key { get; set; }
        public string Tooltip { get; set; }
        public string Group { get; set; }
        public double ImageSize { get; set; }
        public Uri ImageSource { get; set; }

        private bool _IsSelected;
        public bool IsSelected
        {
            get { return _IsSelected; }
            set
            {
                _IsSelected = value;
                NotifyOfPropertyChange(() => IsSelected);
            }
        }

        private bool _IsEnabled;
        public bool IsEnabled
        {
            get { return _IsEnabled; }
            set
            {
                _IsEnabled = value;
                NotifyOfPropertyChange(() => IsEnabled);
                NotifyOfPropertyChange(() => EnabledVisibility);
            }
        }

        public Visibility EnabledVisibility { get { return IsEnabled ? Visibility.Visible : Visibility.Collapsed; } }
    }
}
